<%@ page import="myschool.service.SubjectService" %>
<%@ page import="myschool.entity.Subject" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/7/1
  Time: 17:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String sbname = request.getParameter("sbname");
    int sbhour = Integer.parseInt(request.getParameter("sbhour"));
    int sbgid = Integer.parseInt(request.getParameter("sbgid"));
    int add = SubjectService.ME.add(new Subject(sbname, sbhour, sbgid));
    if (add > 0) {%>
<h2>
    新增成功
</h2>
<%} else {%>
<h2>
    新增失败
</h2>
<%}%>

</body>
</html>
